import { IsInt, Min } from 'class-validator';
import { Type } from 'class-transformer';
import { ApiProperty } from '@nestjs/swagger';
export class PaginationDto {
  @ApiProperty({
    example: 0,
    description: 'page start',
  })
  @IsInt()
  @Min(0)
  @Type(() => Number) // Converts string to number
  page: number = 0; // Default value

  @ApiProperty({
    example: 10,
    description: 'page size',
  })
  @IsInt()
  @Min(1)
  @Type(() => Number)
  size: number = 10; // Default value
  //
  @ApiProperty({
    example: 1,
    description: 'user id',
  })
  @IsInt()
  @Min(1)
  @Type(() => Number)
  userId: number = 1; // Default value
}
